Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

193
Views
How to hide navbar on React Router "Not Found" Routes

I am building a web application using React.js and using React Router to manage routing. I want to hide my navbar and footers for the 'Not Found' page.

<Route path='*' element={<NotFound />} />

I see a lot of StackOverflow but it is not working for my application.

my navber is <Menubar /> and footer <Footer />

here is my app.js

function App() {
return (
<div>
  <Menubar />
  <Routes>
    <Route path='/' element={<Home />} />
    <Route path='/home' element={<Home />} />

    <Route path='/inventory' element={<RequireAuth>
     <Inventory />
    </RequireAuth>} />

    <Route path='/inventory/:inventoryId' element={<RequireAuth>
      <InventoryItem />
    </RequireAuth>} />

    <Route path='*' element={<NotFound />} />
  </Routes>

  <Footer />
</div>

); }

export default App;

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!